﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vds2465Telegrams
{
    public enum eReportSubType_Intrusion
    {
        General,
        Assault,
        Burglary,
        Sabotage,
        HostageTaking,
        Area
    }

    public class ReportType_Intrusion : ReportType_Base
    {
        #region private member variables

		private eReportSubType_Intrusion _reportSubTypeIntrusion;

		#endregion private member variables

		#region constructor

		public ReportType_Intrusion(bool onOffFlag, eReportSubType_Intrusion reportSubTypeIntrusion)
			: base(onOffFlag)
		{
			_reportSubTypeIntrusion = reportSubTypeIntrusion;
		}

		#endregion constructor

		#region getters

		public eReportSubType_Intrusion ReportSubType { get { return _reportSubTypeIntrusion; } }

		#endregion getters

		#region ToString, Equals, GetHashCode

		public override int GetHashCode()
		{
			int hashCode = base.GetHashCode();
			hashCode ^= (byte)ReportSubType;

			return hashCode;
		}

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.Append("(");
			stringBuilder.Append(ToStringProperties());
			stringBuilder.Append(")");

			return stringBuilder.ToString();
		}

		internal override string ToStringProperties()
		{
			StringBuilder stringBuilder = new StringBuilder();

			stringBuilder.Append(base.ToStringProperties());

			stringBuilder.Append(", ");

			stringBuilder.Append("ReportSubType='");
			stringBuilder.Append(ReportSubType);
			stringBuilder.Append("'");

			return stringBuilder.ToString();
		}

		public override bool Equals(object obj)
		{
			Type objType = obj.GetType();
			if (this.GetType() == objType)
			{
				ReportType_Intrusion reportTypeIntrusion2Compare = obj as ReportType_Intrusion;
				return EqualsProperties(reportTypeIntrusion2Compare);
			}

			return false;
		}

		internal bool EqualsProperties(ReportType_Intrusion reportTypeIntrusion2Compare)
		{
			if (base.EqualsProperties(reportTypeIntrusion2Compare))
			{
				return (ReportSubType == reportTypeIntrusion2Compare.ReportSubType);
			}
			
			return false;
		}

		#endregion ToString, Equals, GetHashCode
    }
}
